function foo(x: string, y: number): string {
    return x + y
}
foo('a', 111);

let fun = function (x: string, y: number): string {
    return x + y
}
console.log(fun('2', 3));

let bo: (x: string, y: number) => string = function (x: string, y: number): string {
    return x + y
}
console.log(bo('123', 456));

function bo1(x:string,y:string,z?:string):string {
    return x + y + z
}
console.log(bo1('a','b'));
console.log(bo1('a','b','c'));

function bo2(x:string,y:string = 'jia'):string {
    console.log(y);
    return x +y
    
}
console.log(bo2('0'));

function bo3(x:string,y:string,...args:string[]):string{
    console.log(args);
    return x +y
    
}
console.log(bo3('1','2'));
console.log(bo3('1','2','3','4'));


interface Fun {
    (x:string,y:string):string
}
let ning : Fun = function(x:string,y:string):string {
    return x+ y
}
console.log(ning('a','b'));

let tong : Fun = function(a:string,b:string):string {
    return a + b
}
console.log(tong('111','222'));

export {
    foo,
}

